import React from 'react';
import '../style.css'

class Tabbar extends React.Component{
    constructor(props){
        super(props)

        this.state = {
            title:''
        }
    }

    render(){
        return (
            <div className="tabbar_container">
                <div className="header_container">
                    <div className="header_left" onClick={()=>{
                        this.props.father("我是父组件传递子组件的数据")
                    }}>编辑</div>
                    <div className="header_title">{this.state.title}</div>
                    <div></div>
                </div>
            </div>
        )
    }

    componentDidMount(props){
        this.setState({
            title:this.props.title
        })
    }
}

export default Tabbar